package com.aspose.cells;

class zamh extends zbz {
   zamh() {
      this.c(2167);
   }

   int a(ListObject var1) {
      int var2 = 54;
      zrw var3;
      if (var1.e != null) {
         var3 = new zrw(var1.v());
         var2 += zvd.a(var3, var1.a(var1.v()));
      }

      if (var1.f != null) {
         var3 = new zrw(var1.w());
         var2 += zvd.a(var3, var1.a(var1.w()));
      }

      if (var1.g != null) {
         var3 = new zrw(var1.x());
         var2 += zvd.a(var3, var1.a(var1.x()));
      }

      return var2;
   }

   void b(ListObject var1) {
      this.a((short)this.a(var1));
      this.c = new byte[this.d()];
      this.c[0] = 119;
      this.c[1] = 8;
      System.arraycopy(com.aspose.cells.b.a.zc.a(var1.a()), 0, this.c, 14, 4);
      System.arraycopy(com.aspose.cells.b.a.zc.a(4294967295L), 0, this.c, 22, 4);
      System.arraycopy(com.aspose.cells.b.a.zc.a(4294967295L), 0, this.c, 30, 4);
      System.arraycopy(com.aspose.cells.b.a.zc.a(4294967295L), 0, this.c, 38, 4);
      zrw var2 = null;
      zrw var3 = null;
      zrw var4 = null;
      if (var1.e != null) {
         var2 = new zrw(var1.v());
         this.c[18] = (byte)zvd.a(var2, var1.a(var1.v()));
      }

      if (var1.f != null) {
         var4 = new zrw(var1.w());
         this.c[26] = (byte)zvd.a(var4, var1.a(var1.w()));
      }

      if (var1.g != null) {
         var3 = new zrw(var1.x());
         this.c[34] = (byte)zvd.a(var3, var1.a(var1.x()));
      }

      int var5 = 54;
      if (var1.e != null) {
         var5 = zvd.a(var2, var1.a(var1.v()), this.c, var5);
      }

      if (var1.f != null) {
         var5 = zvd.a(var4, var1.a(var1.w()), this.c, var5);
      }

      if (var1.g != null) {
         zvd.a(var3, var1.a(var1.x()), this.c, var5);
      }

   }

   void c(ListObject var1) {
      String var2 = var1.getDisplayName();
      String var3 = var1.s();
      this.b(24);
      byte[] var4 = null;
      if (var2 != null && !"".equals(var2)) {
         var4 = zakq.a(var2);
         this.b(this.d() + (short)var4.length);
      }

      byte[] var5 = null;
      if (var3 != null && !"".equals(var3)) {
         var5 = zakq.a(var3);
         this.b(this.d() + (short)var5.length);
      }

      this.c = new byte[this.d()];
      this.c[0] = 119;
      this.c[1] = 8;
      byte var6 = 12;
      this.c[12] = 2;
      System.arraycopy(com.aspose.cells.b.a.zc.a(var1.a()), 0, this.c, var6 + 2, 4);
      int var7 = var6 + 6;
      if (var2 != null && !"".equals(var2)) {
         System.arraycopy(com.aspose.cells.b.a.zc.a(var2.length()), 0, this.c, var7, 2);
         if (var2.length() == var4.length) {
            this.c[var7 + 2] = 0;
         } else {
            this.c[var7 + 2] = 1;
         }

         System.arraycopy(var4, 0, this.c, var7 + 3, var4.length);
         var7 += 3 + var4.length;
      } else {
         var7 += 3;
      }

      if (var3 != null && !"".equals(var3)) {
         System.arraycopy(com.aspose.cells.b.a.zc.a(var3.length()), 0, this.c, var7, 2);
         if (var3.length() == var5.length) {
            this.c[var7 + 2] = 0;
         } else {
            this.c[var7 + 2] = 1;
         }

         System.arraycopy(var5, 0, this.c, var7 + 3, var5.length);
         int var10000 = var7 + 3 + var5.length;
      } else {
         var7 += 3;
      }

   }

   void d(ListObject var1) {
      String var2 = var1.getTableStyleName();
      if (var2 == null || var2.length() == 0) {
         var2 = "TableStyleMedium9";
      }

      byte[] var3 = zakq.a(var2);
      this.a((short)(5 + var3.length + 18));
      this.c = new byte[this.d()];
      this.c[0] = 119;
      this.c[1] = 8;
      byte var4 = 12;
      this.c[12] = 1;
      System.arraycopy(com.aspose.cells.b.a.zc.a(var1.a()), 0, this.c, var4 + 2, 4);
      int var5 = var4 + 6;
      this.c[var5] = var1.t();
      var5 += 2;
      System.arraycopy(com.aspose.cells.b.a.zc.a(var2.length()), 0, this.c, var5, 2);
      var5 += 2;
      if (var2.length() == var3.length) {
         this.c[var5++] = 0;
      } else {
         this.c[var5++] = 1;
      }

      System.arraycopy(var3, 0, this.c, var5, var3.length);
   }
}
